<?php echo $this->render($this->includeDir . '/toolbar.php');?>
<?php 
	
	$name 				= Zendvn_Filter_Filter::filterContent($this->Item['name'],'filter');
	$content			= Zendvn_Filter_Filter::filterContent($this->Item['content'],'filter');
	$html_descript 		= Zendvn_Filter_Filter::filterContent($this->Item['html_descript'],'filter');
	$html_keyword 		= Zendvn_Filter_Filter::filterContent($this->Item['html_keyword'],'filter');
	$tags		 		= Zendvn_Filter_Filter::filterContent($this->Item['tags'],'filter');
	$likes		 		= Zendvn_Filter_Filter::filterContent($this->Item['likes'],'filter');
	$cat_id		 		= Zendvn_Filter_Filter::filterContent($this->Item['cat_id'],'filter');
	
	$config 			= new Zendvn_Controller_Config(array('module'=>$this->arrParam['module'],
															'fileConfig'=>'product-category.ini'));
	$imageConfig 		= $config->getConfig('item');
	$image 				= $this->Item['image'];	
	if(!empty($image)){
		$imageUrl		= $imageConfig['thumbUrl2'] . '/' . $this->Item['image'];
		$image 			= $this->cmsImage('image',$imageUrl,array('width'=>'100px'));
	}
	
	$images 			= $this->Item['images'];	
	if(!empty($images)){
		$arrImg 		= json_decode($images, true);
		$images			= '';
		foreach ($arrImg as $k => $v){
			$imageUrl		= $imageConfig['thumbUrl2'] . '/' . $v;
			$images 		.= $this->cmsImage('images',$imageUrl,array('width'=>'100px', 'style' => 'margin-right: 5px; border: 1px solid #ccc; padding: 5px;'));
		}
	}
	
	$options 		= array($this->translate('No'), $this->translate('Yes'));	
	$special 		= $options[$this->Item['special']];
	
	$attribs 		= array('icon'=>'inactive.png','iconDir' => "images/small-icons");
	if($this->Item['status'] == 'active')$attribs['icon'] = 'active.png';
	if($this->Item['status'] == 'lock')$attribs['icon'] = 'lock.png';
	$status 		= '<img src="'. $attribs['iconDir'] .'/'. $attribs['icon'] .'" />';
	
	$views 			= (int)$this->Item['views'];
	$created 		= $this->Item['created']?date('d-m-Y H:i:s',strtotime($this->Item['created'])):'';
	$created_by 	= Zendvn_Filter_Filter::filterContent($this->Item['created_by'],'filter');
	$modified 		= $this->Item['modified']?date('d-m-Y H:i:s',strtotime($this->Item['modified'])):'';
	$modified_by 	= Zendvn_Filter_Filter::filterContent($this->Item['modified_by'],'filter');
	
	$arrRow = array(
					array('label'=>$this->translate('Name'),'info'=>$name),
					array('label'=>$this->translate('Image'),'info'=>$image),
					array('label'=>$this->translate('Other image'),'info'=>$images),
					array('label'=>$this->translate('Category'),'info'=>$cat_id),
					array('label'=>$this->translate('Content'),'info'=>$content),
					array('label'=>$this->translate('Hits'),'info'=>$views),
					array('label'=>$this->translate('Likes'),'info'=>$likes),
					array('label'=>$this->translate('Tags'),'info'=>$tags),
					array('label'=>$this->translate('Html description'),'info'=>$html_descript),
					array('label'=>$this->translate('Html keyword'),'info'=>$html_keyword),
					array('label'=>$this->translate('Created'),'info'=>$created),
					array('label'=>$this->translate('Created by'),'info'=>$created_by),
					array('label'=>$this->translate('Modified'),'info'=>$modified),
					array('label'=>$this->translate('Modified by'),'info'=>$modified_by),
					array('label'=>$this->translate('Statys'),'info'=>$status),
					array('label'=>$this->translate('Special'),'info'=>$special),
				
				);
?>
<div id="element-box">
	<div class="m">
		<div class="form-table">
            	<fieldset class="admin-fieldset">
                <legend class="admin-legend">Form Detail</legend>
            	<table width="100%" border="0">
                	<?php echo $this->partialLoop('row-info.php',$arrRow);?>
                </table>
                <div class="clr"></div>
                </fieldset>
            </div>
            <div class="clr"></div>
	</div>
</div>
